﻿@using Critex.Helpers
@model Critex.ViewModels.HtmlCollectionAreaViewModel

@{
    Layout = null;
}

@Html.ActionLink("Add new text", "AddNewHtmlAreaToCollection", new RouteValueDictionary() {{"collectionId", Model.AreaId}, {"sectionId", Model.SectionId}})

@foreach(var area in Model.Areas)
{
    Html.WriteContentAreaEditField(area, Model.SectionId);
    <div class="delete">
        @Html.ActionLink("Delete", "DeleteHtmlAreaFromCollection", new RouteValueDictionary() {{"collectionId", Model.AreaId}, {"areaId", area.Id}, {"sectionId", Model.SectionId}})
    </div>
}